CREATE TABLE LONG_MAKER (
  MAKER_ID INT NOT NULL ,
  MAKER_NAME VARCHAR(100) NOT NULL ,
  MAKER_INFO VARCHAR(1000) NULL ,
  PRIMARY KEY (MAKER_ID))
--ENGINE = InnoDB
GO
CREATE TABLE LONG_RANGE (
  LONG_MAKER INT NOT NULL ,
  LONG_START BIGINT NOT NULL ,
  LONG_ENDUP BIGINT NOT NULL ,
  LONG_CURRENT BIGINT NULL ,
  PRIMARY KEY (LONG_MAKER) )
--ENGINE = InnoDB
GO
CREATE TABLE LONG_ENTRY (
  LONG_MAKER INT NOT NULL ,
  LONG_VALUE BIGINT NOT NULL ,
  LONG_USEBY INT NOT NULL DEFAULT 0,
  PRIMARY KEY (LONG_MAKER, LONG_VALUE) )
--ENGINE = InnoDB
GO
CREATE INDEX LONG_ENTRY$USEBY ON LONG_ENTRY(LONG_USEBY)
GO
